﻿<%@ Page Title="" Language="C#" MasterPageFile="/Common/Master.master" %>

<script runat="server">

</script>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="Server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentForm" runat="Server">
</asp:Content>
<asp:Content ID="Content3" ContentPlaceHolderID="ContentHtml" runat="Server">
    <div id="toolBar" style="display: none;">
        <div id="toolbarAdd" style="display: none;" data-options="iconCls:'icon-table_add',plain:'true'" class="easyui-linkbutton" onclick="$.fn.DataGrid.Insert(obj)">添加</div>
        <div id="toolbarEdit" style="display: none;" data-options="iconCls:'icon-table_edit',plain:'true'" class="easyui-linkbutton" onclick="$.fn.DataGrid.Update(obj)">修改</div>
        <div id="toolbarDelete" style="display: none;" data-options="iconCls:'icon-table_delete',plain:'true'" class="easyui-linkbutton" onclick="$.fn.DataGrid.Delete(obj)">删除</div>
        <div id="toolbarSearch" data-options="iconCls:'icon-search',plain:'true'" class="easyui-linkbutton" onclick="$.fn.DataGrid.OpenSearch(obj);">搜索</div>
        <div id="toolbarSearchtext"></div>
    </div>
    <div id="page"></div>
    <table id="dg1" style="display: none;">
        <thead>
            <tr>
                <th data-options="field: 'ID',width: 75">自增主键</th>
                <th data-options="field: 'Name',width: 150">项目名称</th>
                <th data-options="field: 'dd_user_id',width: 150">项目负责人</th>
                <th data-options="field: 'address',width: 150">详细地址</th>
                <th data-options="field: 'remark',width: 150">备注</th>
                <th data-options="field: 'longitude',width: 150">位置经度</th>
                <th data-options="field: 'latitude',width: 150">位置维度</th>
                <th data-options="field: 'status',width: 150">项目状态</th>
                <th data-options="field: 'city',width: 150">城市</th>
                <th data-options="field: 'IsDelete_Name',width: 150">是否删除</th>
                <th data-options="field: 'AddUserID_Name',width: 150">创建人</th>
                <th data-options="field: 'LastUserId_Name',width: 150">上次修改人</th>
                <th data-options="field: 'AddTime',width: 150,formatter:function(val,rec){ return $.DateFormat(val, 'yyyy-MM-dd HH:mm:ss'); }">创建时间</th>
                <th data-options="field: 'LastTime',width: 150,formatter:function(val,rec){ return $.DateFormat(val, 'yyyy-MM-dd HH:mm:ss'); }">上次修改时间</th>
            </tr>
        </thead>
    </table>

    <script type="text/javascript">
        var obj;
        $(function () {
            obj = {
                id: "dg1",
                key: "ID",
                url: "Api/V1/dd_project/GetPagesproject",
                deleteUrl: "Api/V1/dd_project/Deleteproject",
                data: {},
                filters: [],

                //title: "管理",
                dialogName: "管理",
                dialogWidth: Cookies.get('DialogWidth') + "px",
                dialogHeight: Cookies.get('DialogHeight') + "px",
                editUrl: "edit.aspx",
                detailsUrl: "details.aspx",
                toolBar: '#toolBar',
                footer: '#page',
                callback: function () { $.fn.DataGrid.onRefresh(obj); }
            };

            function InitSearchList() {
                obj.filters.push({ name: "min_ID", title: "最小主键", col: "ID", filter: ">=" });
                obj.filters.push({ name: "max_ID", title: "最大主键", col: "ID", filter: "<=" });
                obj.filters.push({ name: "Name", title: "项目名称", col: "Name", filter: "like" });
            }

            InitSearchList();
            $.fn.DataGrid.DataBind(obj);
        });
    </script>
</asp:Content>

